package com.bugreport.integration.web;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;

public class IndexPageTestCase extends JettyServerTestCase {

	@Test
	public void displayIndex() throws Exception {

		final WebClient webClient = new WebClient();
		final HtmlPage page = webClient.getPage(getJettyBaseUrl() + "index.html");
		assertEquals("BugReport", page.getTitleText());
		assertTrue(page.asXml().contains("BugReport works !"));
	}
}
